This application is based on Application No. 10-198883 filed in Japan on Jul. 14, 1998, the entire content of which is hereby incorporated by reference.
1. Field of the Invention
The present invention relates to an image processing apparatus and, more particularly, to an image processing apparatus for processing image data obtained by picking up character information by a digital still camera or the like.
2. Description of the Related Art
A digital still camera in which information of an object picked up by an image pick up sensor such as a CCD (Charge Coupled Device) is converted to digital data has come to be widely used. It is possible to pick up or photograph as an object, a media, on which character information is printed, such as newspapers, a magazine or a presentation document, by the digital still camera. When the character information is picked up as an object, the character information itself in the object is small, and when the thus obtained image data is output directly to a printer or a display without any processing, it is difficult for a person to recognize the characters as the characters may be smudged or patchy. This is because the total number of pixels of the image pick up sensor is limited, and such degradation depends on the performance of the digital still camera.
Therefore, generally, the obtained image data is processed to interpolate the characters which are smudged or patchy. The processing includes enlarging and interpolating process, smoothing, and binarization. The enlarging and interpolating process is a method of enhancing density of pixels of the obtained image data, and cubic convolution interpolation and DCT-IDCT (Discrete Cosine Transform-Inverse DTC) are examples of this method. By the enlarging and interpolating process, characters in the image data are interpolated to be smooth. Smoothing is performed by detecting and correcting an edge portion from the image data. By the smoothing process, the characters in the image data are corrected to be sharper. Binarization is to binarize the character information.
When the character image formed on the image pick up sensor is compared with the output of the image pick up sensor, however, the output of the image pick up sensor of a thin line of which width is approximately equal to or smaller than the pixel of the image pick up sensor has lower density than the character image actually formed on the image pick up sensor.
When the width of the thin line is narrower than the width of the pixel of the image pick up sensor, for example, the thin line is detected as a line having the width of the pixel. Therefore, the output of the image pick up sensor comes to be wider and faded than the character image on the image pick up sensor. When the thin line of which width corresponds to the width of the pixel of the image pick up sensor is formed bridging between two pixels on the image pick up sensor, the thin line is on only half of each of the two pixels on which the thin line is formed, and therefore the output of each pixel is one half that when the same thin line is formed on one pixel of the image pick up sensor. As a result, the thin line recognized from the image pick up sensor outputs (of two pixels) has double the width and half the density of the original thin line.
The above described problem cannot be solved even when the obtained image data is subjected to enlarging and interpolating process, as the interpolation is performed on the line which is wider in width and lower in density than the actual line.
When the obtained image data or the data after enlargement and interpolation is to be binarized, a portion having the density lower than a threshold value is determined to have zero density, and as a result, the thin line becomes patchy, or partially missed.
Though the above described problem can be solved by smoothing in which an edge portion of the thin line is detected from the output of the image pick up sensor and corrected, the process of detecting the thin line is difficult and time consuming.
The present invention was made to solve the above described problems, and its object is to provide method and apparatus of image processing capable of interpolating a thin line to be dense while thin in width without the necessity of specifying the thin line from the image data, and capable of preventing, in a simple manner, the thin line after image data binarization from being patchy, as well as to provide a computer program product for processing an image.
In order to attain the above described objects, the present invention provides, according to an aspect, an image processing apparatus including detecting means for detecting, for each of a plurality of pixel data constituting image data, based on densities of a process object pixel data to be processed and peripheral pixel data positioned around the process object pixel data, density peak of said process object pixel data, and correcting means for correcting density of the process object pixel data, using the density peak detected by the detecting means.
According to another aspect, the present invention provides a method of image processing, including a first step of detecting density peak of process object pixel data, for each of a plurality of pixel data constituting image data, based on densities of the process object pixel data to be processed and peripheral pixel data positioned around the process object pixel data, and correcting density of the process object pixel data using the density peak detected in the first step.
According to a still further aspect, the present invention provides a computer program product on a recording medium executable by a computer for processing an image, the computer program product including detecting means for detecting, for each of a plurality of pixel data constituting an image data, based on densities of process object pixel data to be processed and peripheral pixel data positioned around the process object pixel data, density peak of the process object pixel data, and correcting means for correcting density of the process object pixel data, using the density peak detected by the detecting means.
According to these aspects of the present invention, the density peak is detected for every pixel data based on a pixel data and surrounding pixel data and the pixel data is corrected based on the density peak, and therefore method and apparatus for image processing, and a computer program product for image processing capable of interpolating a thin line to be dense and thin without the necessity of specifying the thin line among image data and capable of preventing patchy images after binarization of the image data can be provided.